﻿using System.Runtime.InteropServices;

namespace Epic.Core
{
#pragma warning disable 1591
    [StructLayout(LayoutKind.Explicit)]
    internal struct Unchecked<T>
        where T : class
    {
        [FieldOffset(0)]
        public object Object;
        [FieldOffset(0)]
        public T TypedObject;
    }

    [StructLayout(LayoutKind.Explicit)]
    public struct Unchecked<A, B>
        where A : struct
        where B : struct
    {
        [FieldOffset(0)]
        public A ValueA;
        [FieldOffset(0)]
        public B ValueB;
    }
}
